package com.xinqi.common.core.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BasicEnum;
import lombok.Getter;

public enum AssistantOperateEnum {

    INSERT(0, "插入"),
    UPDATE(1, "更新");

    @Getter(onMethod_ = {@JsonValue})
    private final int code;

    @Getter
    private final String describe;

    AssistantOperateEnum(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static AssistantStateEnum of(Integer code) {
        return BasicEnum.of(AssistantStateEnum.class, code);
    }
}
